package cn.com.bluemoon.daps.api.sys;

import cn.com.bluemoon.daps.api.sys.factory.RemoteSysOperateLogServiceFallbackFactory;
import cn.com.bluemoon.daps.api.sys.factory.RemoteSysPropertyServiceFallbackFactory;
import cn.com.bluemoon.daps.api.sys.factory.RemoteSystemDatasourceServiceFallbackFactory;
import cn.com.bluemoon.daps.api.sys.factory.RemoteSystemInfoServiceFallbackFactory;
import cn.com.bluemoon.daps.common.constant.ServiceNameConstants;
import cn.com.bluemoon.daps.common.domain.ResultBean;
import cn.com.bluemoon.daps.system.entity.DapSystemProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;
import java.util.Map;

@FeignClient(value = ServiceNameConstants.DapsApiSystem.SERVICE, fallbackFactory = RemoteSysPropertyServiceFallbackFactory.class)
@RequestMapping(ServiceNameConstants.DapsApiSystem.BASE_URI + ServiceNameConstants.DapsApiSystem.API_SYSINFO)
@ApiIgnore
public interface RemoteSysPropertyService {

    @PostMapping("/property/list")
    ResultBean<Map<String, List<DapSystemProperty>>> getPropertyInfo(@RequestBody List<String> groupList);
}
